package com.mydemo.mybatisdemo1.bll;

import com.mydemo.mybatisdemo1.dto.UserInfo;
import com.mydemo.mybatisdemo1.mapper.one.UserMapper;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


@ComponentScan({"com.mydemo.mybatisdemo1.mapper"})
@Service("userService")
public class UserServiceImpl implements UserService {
    @Resource(name="OneUserMapper")
    private UserMapper userMapper;

    @Override
    public void insert(UserInfo user) {
        userMapper.insert(user);
    }

    @Override
    public void update(UserInfo user) {
        userMapper.update(user);
    }

    @Override
    public UserInfo find(int id) {
        return userMapper.find(id);
    }

    @Override
    public void delete(int id) {
        userMapper.delete(id);
    }
}
